package com.example.comsumer.client;




import com.rpctest.myrpc.common.RpcRequest;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.Observer;
import java.util.UUID;
import java.util.concurrent.SynchronousQueue;

/**
 * @ClassName RemoteInvocationHandler
 * @Description TODO
 * @Author 11
 * @Date 2021/4/2 9:01
 * @Version 1.0
 */
public class RemoteInvocationHandler implements InvocationHandler {

    String host;
    int port;


    public RemoteInvocationHandler(String host, int port) {
        this.host = host;
        this.port = port;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        RpcRequest request = new RpcRequest();  //真正的代理类
        return rpcNetTransport.send(request);

    }
}